<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./node_modules/animate.css/animate.css">
    <script src="vue.js"></script>
    <style>
        /*显示到隐藏*/
        /*隐藏到显示*/
        /*keyframe的同时使用*/
        @keyframes big {
            0%{
                transform: scale(0);
            }
            50%{
                transform: scale(1.5);
            }
            100%{
                transform: scale(1);
            }
        }
        .fade-enter,.fade-leave-to{
            opacity: 0;
        }

        .active,.leave{
            transition: opacity 1s;
            transform-origin: left center;
            animation: big 1s reverse;
        }
    </style>
</head>
<body>
<div id="app">
    <transition
                name="fade"
                enter-active-class="active"
                leave-active-class="leave"
                >
        <div v-if="show">hello</div>
    </transition>
    <button @click="handelClick">show</button>
</div>
</body>
<script>
    var app = new Vue({
        el:'#app',
        data:{
            show:true
        },
        methods:{
            handelClick:function () {
                this.show = !this.show
            }
        }
    })
</script>
</html>
